rf2_plugin_tvfandomcom-20200213-history
RF2 Plugin Tv Wiki
rFactor2 Tv Plugin This plugin enhance TV broadcast of rFactor2 race, by adding widget and behaviors. This wiki will describe the plugin capabilities and the way to fully customize it (UI fully described in "ini" files) For now, the plugin is in alpha phase, so it is not available for anyone. It is only in test in my racing team (Gentlemen Racers ) This software contains two part : 'The plugin' *'Description:' **The main purpose of the plugin is to provide widgets to be displayed as rF2 overlay. Each widget provide its own information and is full customizable in term of UI. *'Installation': **The "dll" must be copied into the rf2 core directory plugins **The "GRTvPlugin" directory containing all ini files and images must be copied into the rF2 data player profile directory 'The Remote Console' *'Description': **This console is a two way console. This means it receive data from the plugin (drivers states, noticiable events), and can send command to the plugin (view a given driver, change camera, show/hide widget, replay noticeable event...) *'Installation': **You can copy the "exe" and its ini file in any directory Please visit the Remote Console page to see how it works. Overview GRAB_027.JPG GRAB_024.JPG tvconsole.png GRAB_029.JPG TvConsoleWeather2.png TvConsoleWeather1.png gt-series.jpg Camera Control This is not a widget, but this plugin allows you to jump directly to a driver at a given place. With the default shortcut, using the Numpad of your keyboard you can reach any driver using its race place. Additionnaly you can select which camera to use to view the new driver, using key modifiers. Those shortcuts are defined in the "GRTvPlugin.ini" file, under the Keyboard.CameraControl section. Those "virtualCode" come from the list of constant that you can find here . Display Profiles If you want to have several display, you can use profile. With a profile you can hide some widget and move others. A shortcut allows you to cycle around all profiles (example: Left CTRL + D or Left CTRL E). The profiles are defined in the main "UI" file. Plugin Control There is some Keyboard shortcuts to manage some global parameter of the plugin Those shortcuts are defined in the "GRTvPlugin.ini" file, under the Keyboard section. Each key binding is managed by a modifier code and a key code. Those two code come from the same list of constant that you can find at here . For exemple, if you want to map Left Ctrl+T, you will set the modifier to 162 (decimal representation of 0xA2) and 84 for the key (decimal representation of 0x54). Widgets description This section lists all available widget, and for each of them you will find a screenshot and a link to the detailed page. 'Driver Information' This widget show several information of the viewed driver. *Please visit the description page to view all available information provided by this widget 'Driver Timing' This widget show several timing information of the viewed driver. *Please visit the description page to view all available information provided by this widget 'Scrolling Banner' This widget show the realtime ranking using an horizontal scrolling panel Here an example when showing all categories Here an example when showing only one category (using the keyboard mapping "cycleCategories") *Please visit the description page to view all available information provided by this widget 'Weather Panel' This widget show some weather informations ... 'Session Status' This widget display some information about the session/track status. *Please visit the description page to view all available information provided by this widget 'UI Information' This widget show an image and a version. You can use it to identify the version of your UI. For the UI provided with the plugin, this version match with the plugin version. ... 'Overtake' This widget is displayed each time a pilot overtake another driver. ... 'Compare 3 Driver' This widget displayed the laptime gap between the current driver and two other one. (generally the one at higher place and the one at lower place). A specific font and font color can be used to identify the viewed driver. ... 'Tower' This widget displayed the tower and have 5 data modes. A key/modifier can be definied to cycle around modes (ex: "F"). See "cycleTower" prefix in the Keyboard section. *No data *Gap *Number of pits *Number of laps * Max Speed (km/h) By default, the driver name is the rF2 driver name. If you want to override it, you can use the driver mapping ini file. On the mapping file you can specify the name of a driver. If you use the three letter code instead of the driver name, you can override the auto-generated code by specifying yours. 'Speed Trap' This widget show the terminal speed, at the faster point of the track. After a configured number of lap made by the driver, the widget will be displayed, for 4s, when the driver reach its terminal speed at the speed trap point of the track (The best speed is specific for each category). 'Weather Full' This widget display weather condition. All data come from the Remote Console, so it is the only widget that need the remote console to run, as the console provide the data to display to the widget via UDP trames. To define the parameters used to retreive weather data, please look the corresponding Remote Console paragraph It is composed of : *A radar/satelitte images : Radar shows rain, satellite show clouds. The two images can be overlayed. 'Replay' This widget is just an image displayed when the game is in replay mode. You can activate/desactivate the blinking effect, and configure it. 'CuttingLineGap' This widget displayed the gap between a driver, that just cut the line with the leader. Each time a new car cut the line, an area is displayed (added cell) to the widget. This widget is an implementation of this real TV widget . By default, the driver name is the rF2 driver name. If you want to override it, you can use the driver mapping ini file. On the mapping file you can specify the name of a driver. If you use the three letter code instead of the driver name, you can override the auto-generated code by specifying yours. 'Fastest Lap' This widget is displayed each time a driver beat the best lap of its category group. This widget have the same UI fields as the Driver Panel, plus a field to display the new best lap time. ... 'Winner' This widget is displayed when the winner finish its session. This widget have the same UI fields as the Driver Panel, plus a three fields to display the session duration, the driven distance and the maximum reached speed. ... UI Customization The plugin read, as root configuration file, the "GRTvPlugin.ini" file under the "/UserData//GRTvPlugin/" directory. Here the description of each section: *'UI section' *'Mapping section' Here some general rules about UI: *All file path must be relative to the directory containing the root ini file ("/UserData//GRTvPlugin/") *The width and the height of an image is always optional (in this case, the width and/or height is the one of the image file) 'UI file' This is the main ui file of an UI. This is the file referenced in the "GRTvPlugin.ini" in the section UI and "ini" key. This files contains the list of all images, all fonts, all colors and all individual widget files. Here the description of each section: 'Resolution section' 'List section' 'List section' *''As the image.color.id default value is 1, i recommand to set the color.1 to a white color. So you don't need to specify a "image.color.id" when you don't want to alter the original image colors.'' 'List section' 'List section' It is the same thing than the image list, but it allows you to isolate logo and ui images. 'List section' It is the same thing than the image list, but it allows you to isolate avatars and ui images. 'Widgets section' 'Profiles section' *'Profile. section' ( in 1...count) For each widget in the Widgets section, you can specify several properties prefixed by . 'ProfilePerCameraType section' This allows to affect a profile ID to a camera type. As soon as the camera type is changed in rF2, the plugin will look if a profile ID is defined for it, if yes the plugin switch automatically to this profilethe display profile will be automatically choosen. Here, the camera type values (same as the rF2 API) '' // Camera types (some of these may only be used for *setting* the camera type in WantsToViewVehicle())'' '' // 0 = TV cockpit'' '' // 1 = cockpit'' '' // 2 = nosecam'' '' // 3 = swingman'' '' // 4 = trackside (nearest)'' '' // 5 = onboard000'' '' // :'' '' // :'' '' // 1004 = onboard999'' '' // 1005+ = (currently unsupported, in the future may be able to set/get specific trackside camera)'' For example, you can specify to auto activate the profile ID=2 when in cockpit camera and the profile ID=1 for any other camera ProfilePerCameraType camera.0=2 camera.1=2 camera.other=1 Category:Browse